package com.pureut.equipment.service;

import com.pureut.equipment.domain.EquipmentDispatch;
import com.pureut.equipment.domain.EquipmentMaintenance;
import com.pureut.equipment.domain.EquipmentRepair;
import com.pureut.equipment.domain.EquipmentState;
import com.pureut.equipment.domain.dto.EquipmentRepairDto;
import com.pureut.equipment.domain.vo.EquipmentRepairVo;

import java.util.List;

/**
 * @Description
 * @Param
 * @Date
 * @Author hl
 **/
public interface IEquipmentRepairService {

    /**
     * 查询设备维修列表
     *
     * @param equipmentRepairVo 接受类
     * @return 设备维修列表
     */
    List<EquipmentRepairDto> selectRepairList(EquipmentRepairVo equipmentRepairVo);

    /**
     * 新增设备维修
     *
     * @param equipmentRepair 接受类
     * @return 成功 true 失败 false
     */
    boolean insertEquipmentRepair(EquipmentRepair equipmentRepair);

    /**
     * 修改设备维修
     *
     * @param equipmentRepair 接受类
     * @return 成功 true 失败 false
     */
    boolean updateEquipmentRepair(EquipmentRepair equipmentRepair);

    /**
     * 查询单个设备维修列表
     *
     * @param repairId id
     * @return 设备维修列表
     */
    EquipmentRepairDto selectRepairById(long repairId);

    /**
     * 删除设备维修
     *
     * @param repairId id
     * @return 成功 true 失败 false
     */
    boolean deleteRepairById(long repairId);

    /**
     * 派工
     *
     * @param equipmentDispatch
     * @return 成功 1 失败 0
     */
    int dispatchEquipmentRepair(EquipmentDispatch equipmentDispatch);

    /**
     * 执行维修
     *
     * @param equipmentMaintenance
     * @return 成功 1 失败 0
     */
    int maintenanceEquipmentRepair(EquipmentMaintenance equipmentMaintenance);

    /**
     * 提交审核
     *
     * @param repairId
     * @return 成功 1 失败 0
     */
    int submitEquipmentRepair(long repairId);

    /**
     * 审核单据
     *
     * @param equipmentState
     * @return 成功 1 失败 0
     */
    int auditEquipmentRepair(EquipmentState equipmentState);

    /**
     * 添加知识库
     */
    boolean addKnowLedge(Long id);
}
